import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import CodeMirror from '@/components/CodeMirror'
import index from '@/views/index'
import editor from '@/components/CodeMirror'
import Block from '@/components/Block'
import OutPut from '@/components/OutPut'
import Home from '@/views/home/index'


Vue.use(Router)

export default new Router({
  routes:
   [
    {
      path: '/',
      name: 'HelloWorld',
      component: index
    },
    {
      path:'/editor',
      name:'editor',
      component:editor

    },
    {
      path:'/block',
    name:'block',
    component:Block
  },
  {
    path:'/output',
    name:'output',
    component:OutPut
  },
  {
    path:'/home',
    name:'home',
    component:Home,
    children:[
      {
        path:'homeCode',
        name:'homeCode',
        components:{
          homeOut:OutPut,
         
        }
      }
    ]
  }

  ]
  
})
